
public class Constants {
	private static char[] allDirections;
	private static char[] allDirectionsRev;
	private static Constants constants;
	
	private Constants() {
		allDirections = new char[4];
		allDirections[0] = 'u';
		allDirections[1] = 'r';
		allDirections[2] = 'd';
		allDirections[3] = 'l';
		
		allDirectionsRev = new char[4];
		allDirectionsRev[0] = 'l';
		allDirectionsRev[1] = 'd';
		allDirectionsRev[2] = 'r';
		allDirectionsRev[3] = 'u';
	}
	
	public static char[] getAllDirections() {
		if (constants == null) constants = new Constants();
		return allDirections;
	}
	
	public static char[] getAllDirectionsRev() {
		if (constants == null) constants = new Constants();
		return allDirectionsRev;
	}
}
